package com.atguigu.spring.bean;

/**
 * 订单类：演示有参构造器注入
 * @author 孙志鹏
 * @create 2021-06-08 22:52
 */
public class Order {

    /**
     * 订单号
     */
    private String id;

    /**
     * 订单金额
     */
    private Integer money;

    /**
     * 声明有参构造器
     * @param id
     * @param money
     */
    public Order(String id,Integer money) {
        this.id = id;
        this.money = money;
    }

    /**
     * 重写toString方法
     * @return
     */
    @Override
    public String toString() {
        return "Order{" + "id:" + id + "money:" + money + "}";
    }
}
